﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;
using N2.Configuration;

namespace AWS.N2CMS.Tags
{
    	[ConfigurationCollection(typeof(TagDefinitionElement))]
    public class TagDefinitionCollection : LazyRemovableCollection<TagDefinitionElement>
    {
            protected override void OnDeserializeRemoveElement(TagDefinitionElement element, System.Xml.XmlReader reader)
            {
                var isFancy = true;
                bool.TryParse(reader.GetAttribute("isFancy"), out isFancy);
                element.IsFancy = isFancy;
            }
    }
}